package com.huaguoguo.sso.service;

import com.huaguoguo.entity.User;
import com.huaguoguo.entity.vo.Result;
import com.huaguoguo.pojo.TbUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * description:
 * author:huaguoguo
 * Date: 2019/2/16
 * Time: 21:53
 */
@FeignClient(value = "huaguoguo-store-service-sso")
public interface LoginService {

    /**
     * 登录接口
     * @param user
     * @return
     */
    @RequestMapping(value = "/login",method = RequestMethod.POST)
    Result login(@RequestBody TbUser user);

    @RequestMapping(value = "/curr_user",method = RequestMethod.GET)
    Result currentUser(Long userId) throws Exception;
}
